package com.aios.action.user.iris;

import com.aios.action.ISortColumn;
import com.aios.util.DataManipulator;

public class IrisUserListAction extends AbstractIrisUserAction implements
		ISortColumn {

	private static final long serialVersionUID = 1L;

	public String execute() {
		DataManipulator manipulator = new DataManipulator();

		/*if (getManipulatorSessionVariable() != null) {
			manipulator = getManipulatorSessionVariable();
		} else {*/
			manipulator.clearSearchParam();
			manipulator.setSortBy(this.getDefaultSortColumn());
			manipulator.setSortOrder(this.getDefaultSortOrder());
			manipulator.setDataType("iris_user");
			addManipulatorSessionVariable(manipulator);
		//}
		pager = irisUserService.viewPaginatedActiveList(pageStart, pageSize,
				manipulator);
		pager = setActionContext(pager);
		return SUCCESS;
	}

	@Override
	public String getDefaultSortColumn() {
		return "EMPLOYEE_ID";
	}

	@Override
	public String getDefaultSortOrder() {
		return "ASC";
	}
}
